Darwins Frog Monomorphic Call Structure And Dimorphic vocal phenology

# require = will install and load, library can only load installed
# packages
require(tidyverse)
require(ggplot2)  #  pretty plots
require(dplyr)  # dataframe manipulations and  %>% 
require(infer)  #  statistics
require(tidyr)  # nice tables that look nice
require(car)  # ANOVA, also used by the authors for ANOVA
require(MASS)  # reported used for normalizing data for ANOVA
require(formatR)  #to format R
require(knitr)  # inserting images
require(kableExtra)  # modifying kable tables
require(skimr)  # for data overview, data visualization 

introduction:

[Include a brief summary of the paper you are reanalyzing data from (e.g., the overall objective of the paper, the types of data collected and how sampling was done, what the main results were) and lay out what you intend to replicate.]

background

The southern Darwin’s frog (Rhinoderma darwinii) mouth-brooding frog species endemic to Chilean Patagonia. R. darwinii has a fascinating method for reproduction: the female (egg-producer) deposits eggs and the male (sperm-producer) fertilizes them, then guards them until the embryos are visibly wriggling inside. Then the male transfers those eggs to their vocal sac where they will be safe from predators and receive nutrients from the male (similar to marsupial embryonic development in their pouch). Ultimately, the male broods these fertilized eggs, often from multiple clutches with different partners, in their vocal sacs for about 50 days, until fully developed froglets emerge by pushing their way out the male’s mouth! All a while during this gestation period, the male continues to call for mates (Sandmeier, 2016)! There are 3 sex roles in this species: pregnant male (MP), non-pregnant male (M or NPM), and female (H or F), and the main sexually dimorphic characteristic is size, where the egg-producers are slightly larger. In this nearly sexually monomorphic (i.e., the sexes look physically identical) species, mate selection depends on advertising calls, and R. darwinii is one of the few species where all sexes (PM, NPM, and F) use advertising calls to attract the attention of a potential mate (Serrano et al., 2020).

hypothesis

To address the gap in the literature regarding the calling behaviors of female R. darwinii, Serrano et al. (2020) hypothesized the time fluctuation of the each sex experiencing intrasexual competition dictates the species position on the continuum of sexual monomorphism to dimorphism. {does my rephrasing make as much sense as the original/does it convey the original?} [the position along the monomorphism-dimorphism continuum of sexual signals depends on the time fluctuation of the sex experiencing intrasexual competition]

methods

They investigated this with a population of southern R. darwinii on Chiolé Island in Southern Chile during mating season (October 2015-February 2016). In the field, they first recorded individual calls (tracks) then collected population monitoring data (snout-vent length, SVL (mm); weight (g)). They also collected data on the sex and sexual status (MP = pregnant male, H = female, M = non-pregnant male) of each frog caught using body size and morphological characteristics. For the pregnant males, they counted externally the number of larvae in the vocal sacs. For each call recordings, they measured the call repetition rate (CRR, number of calls made in a 5 min period after the first call produced), the sound pressure level (SPL, dB), call duration (CD, seconds), the number of notes per call (NC), the note duration (ND, ms), the dominant frequency of the call (DF, Hz); and the amplitude of each vocalization (root mean square (RMS) amplitude) (Serrano et al., 2020).
The authors used Simple Pearson correlations to explore the association used to explore association between acoustic variables of the calls (CRR, SPL, CD, NC, ND, DF) with physical characteristic variables (SVL, weight). They used Spearman correlations to determine the association between acoustic properties of the calls of pregnant males and the number of tadpoles in their vocal sacs

results

data replication

lay out what you intend to replicate.

Visualization of Data

[Include a view of the first few lines of the dataset plus any exploratory data analysis - e.g., overview of descriptive statistics included in the paper, plots, etc.]

load in dataset:

f <- "https://raw.githubusercontent.com/slcornett/data-analysis-replication/main/data/Serrano_et_al_2020_MPMH.csv"
d <- read_csv(f, col_names = TRUE, show_col_types = FALSE)  # show column names, hides dataframe message details

data summary statistics

# Data summary 
s <- skim(d) # to make a summary table of skim(d) output
# character data
s %>% dplyr::filter(skim_type == "character") %>% 
  dplyr::select(skim_variable, n_missing, character.min, character.max, character.empty, character.n_unique) %>% 
  kable(align = 'l', booktabs = TRUE) %>% 
  kable_styling(font_size = 9, full_width = FALSE)
skim_variable n_missing character.min character.max character.empty character.n_unique
Nombre 0 3 15 0 30
Captura 0 3 4 0 31
Sex 0 7 18 0 3
Sexo 0 1 2 0 3
Track 0 4 4 0 31
# numeric data modify the specific output
s %>% dplyr::filter(skim_type == "numeric") %>%
  dplyr::select(skim_variable, n_missing, numeric.mean, numeric.sd, numeric.p0, numeric.p25, numeric.p50, numeric.p75, numeric.p100, numeric.hist) %>%
  kable(align = 'l', booktabs = TRUE) %>% # left aligned data
  kable_styling(font_size = 9, full_width = FALSE) # font-size
skim_variable n_missing numeric.mean numeric.sd numeric.p0 numeric.p25 numeric.p50 numeric.p75 numeric.p100 numeric.hist
Calls5min 0 7.290323e+00 2.734880e+00 3.000000 5.000000 8.000000e+00 9.000000e+00 1.200000e+01 ▅▅▇▅▅
Temp 22 1.938889e+01 3.077923e+00 15.400000 18.200000 1.900000e+01 2.030000e+01 2.560000e+01 ▅▇▅▂▂
HR 22 7.883333e+01 4.238514e+00 71.500000 75.100000 7.920000e+01 8.210000e+01 8.420000e+01 ▂▃▂▂▇
Larvas 20 3.090909e+00 1.221028e+00 2.000000 2.000000 3.000000e+00 4.000000e+00 5.000000e+00 ▇▃▁▃▃
LHC 1 2.242667e+01 9.351132e-01 20.600000 21.800000 2.235000e+01 2.307500e+01 2.520000e+01 ▂▇▅▂▁
Peso 1 9.356667e-01 1.389042e-01 0.680000 0.837500 9.200000e-01 1.045000e+00 1.190000e+00 ▇▆▇▆▇
SPL 6 6.336860e+01 4.117350e+00 53.418182 61.700000 6.322143e+01 6.631667e+01 7.143103e+01 ▂▃▇▇▃
NC 0 1.474194e+01 7.763022e+00 4.000000 8.000000 1.400000e+01 1.800000e+01 3.300000e+01 ▆▇▃▃▂
ND 0 1.684006e-01 3.099900e-02 0.115131 0.142706 1.624118e-01 1.890287e-01 2.565455e-01 ▅▇▃▃▁
CD 3 1.670783e+00 2.164759e-01 1.311454 1.510821 1.636583e+00 1.838234e+00 2.141000e+00 ▅▇▅▃▃
Agg Entropy 0 2.106072e+00 5.376220e-01 1.379379 1.666791 1.942529e+00 2.477863e+00 3.161019e+00 ▇▆▃▂▃
Avg Entropy 0 1.970192e+00 3.396755e-01 1.524621 1.723484 1.851720e+00 2.123599e+00 2.721850e+00 ▇▇▃▃▂
DF 0 3.597235e+03 2.901571e+02 2995.193548 3389.708648 3.617600e+03 3.793418e+03 4.272157e+03 ▂▆▇▅▂
RMS Amp 0 1.005410e+05 7.949927e+04 12731.900000 53886.150000 6.422570e+04 1.228883e+05 3.560384e+05 ▇▃▁▁▁
detach(package:skimr)

DESCRIPTIONS/IDENTIFIERS:
- Nombre = name given to ID the frog;
- Captura = number captured/image name;
- Track = the call recording track
PHYSICAL MEASUREMENTS:
- sexo = sexual status (MP = pregnant male, H = female, M = non-pregnant male)
- peso = mass (g);
- LHC = longitud hocico a cola (snout-vent length, mm);
- temp = temperature (ºC);
- HR = relative humidity;
- larvas = number of tadpoles/offspring in their parent’s mouth!
ACOUSTIC VARIABLES:
- Calls5min = calls in 5 min interval (call repetition rate);  - SPL = Sound Pressure Level (dB);  - NC = number of notes/call;
- ND = note duration (ms);
- CD = call duration (s);
- Agg Entropy = aggregate entropy;
- Avg Entropy = average entropy;
- DF = dominant frequency of call (Hz);
- RMS Amp = Root Mean Square Amplitude

Statistical Replications/Reanalysis

Be sure to thoroughly explain what replications you are doing and comment your code so that it is easy for a reader to understand. Include in this section relevant tables/figures/values from the original paper for comparison to what you accomplished with your replication. Note that I want you to do the bulk of any exposition using text and markdown syntax outside of code blocks. That is, your document should not just be one big code block with R style comments but rather a nicely formatted report with code separated from exposition, interpretation, and discussion.]

Table 1: Average ± SD of Body Size and Acoustic Features for R. darwinii

ANOVA

Figure 3: (a) Note Duration (b)

visualization

• descriptive statistical analysis • one visualization • one inferential statistical analysis

Summary/Discussion

Narrative section that overviews how successful were you at replicating the analyses and visualizations in the study.
1. What problems did you encounter?
2. Why might you have encountered those problems?
3. What details were lacking from the original study’s methods that might have hampered your ability to replicate the authors’ results?

References

• Sandmeier, F. (2016). Rhinoderma darwinii [Encyclopedia]. AmphibiaWeb; University of California, Berkeley, CA, USA. https://amphibiaweb.org/species/4322

• Serrano, J. M., Penna, M., Valenzuela-Sánchez, A., Mendez, M. A., & Azat, C. (2020). Monomorphic call structure and dimorphic vocal phenology in a sex-role reversed frog. Behavioral Ecology and Sociobiology, 74(10), 127. https://doi.org/10.1007/s00265-020-02903-3